<?php

include 'dbvalues.php';
ini_set( "display_errors", 0);
date_default_timezone_set('Canada/Mountain');


//DB conection 
function DB_Open()
{
	

	$con = mysql_connect($GLOBALS['server'],$GLOBALS['user'],$GLOBALS['pass']);
	
	if (!$con)
	  {
	  	die('Could not connect: ' . mysql_error());
	  	return "error";
	  }
	 else
	 {
		mysql_select_db($GLOBALS['db'], $con);
	 	return $con;
	 }

}


 function getuser()
{

	$con = DB_Open();
	$sql = "select * from track order by id desc limit 100";
	$rs_result = mysql_query ($sql,$con);
	mysql_close($con);
	return $rs_result;
 
}

function getpopupinfo()
{

	$con = DB_Open();
	$sql = "select * from popupinfi";
	$rs_result = mysql_query ($sql,$con);
	mysql_close($con);
	return $rs_result;
 
}

?>